import Koa from "koa";

const ex = async () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      console.log("test out");
      resolve("successful");
    }, 1000);
  });
};

const getTest = async (
  ctx: Koa.ParameterizedContext<Koa.DefaultState, Koa.DefaultContext, any>
) => {
  ctx.response.body = await ex();
};

export { getTest };
